package com.module.shici.room;

import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.Query;


import com.module.shici.room.entity.Collect;

import java.util.List;

@Dao
public interface MusicDao {
    @Query("select * from erge")
    List<Music> getErgeList();
    @Query("select * from gongzhugushi")
    List<Music> getGongzhugushiList();
    @Query("select * from guoxue")
    List<Music> getGuxueList();
    @Query("select * from shaoerbaike")
    List<Music> getShaoerbaikeList();
    @Query("select * from yinxionggushi")
    List<Music> getYinxiaoggushiList();
//    @Delete erge where title=:title
//    void deleteErgeByName(title);
    @Query("DELETE from erge where title=:title")
    void delete(String title);
    @Insert
    void InsertCollect(Collect... collects);
    @Query("select * from Collect order by id DESC")
    List<Music> getCollect();
    @Query("select * from collect where chaper=:chaper")
    List<Music> queryCollectByTitle(String chaper);
    @Query("DELETE from collect where chaper=:chaper")
    void deleteCollect(String chaper);
}
